<!-- Sidebar -->
<ul class="navbar-nav sidebar accordion" id="accordionSidebar">

	<!-- Sidebar - Brand -->
	<a class="sidebar-brand d-flex align-items-center justify-content-center" href="{$dashboardPageUrl}">
		<div class="sidebar-brand-text mx-2">{:config('system.simple_title')}</div>
	</a>
	
	<div class="user-photo">
		<a class="user-img" title="我的头像">
			<img src="{$adminInfo['avatar']}" class="user-avatar">
		</a>
		<div class="user-hello">你好！<span class="user-name">{$adminInfo['username']}</span>, 欢迎登录</div>
    </div>
    
	<!-- Divider -->
	<hr class="sidebar-divider my-0">

	<!-- Nav Item - Dashboard -->
	<li class="nav-item">
		<a class="nav-link" href="{$dashboardPageUrl}">
			<i class="iconfontzz icon-kongzhitai"></i>
			<span>控制台</span>
		</a>
		<span class="daui-nav-bar"></span>
	</li>
	
	{volist name="sideBarMenuCategory" id="voCategory"}
		<!-- Divider -->
		<hr class="sidebar-divider">

		<!-- Heading -->
		<div class="sidebar-heading" style="display: none">
			{$voCategory['name']}
		</div>
<?php
$sidebarMenuArr = $sidebarMenuGroup[$voCategory['id']];
//print_r($sidebarMenuArr);exit;
?>
		{volist name="sidebarMenuArr" id="voMenu"}
		<?php
			if (!$voMenu['checked']) {
				continue;
			}
			if (!$voMenu['display']) {
				continue;
			}
			if ($voMenu['url']) {
				$url = $vo2['url'];
				$right = '';
				$liClass = '';
			} else {
				$url = 'javascript:;';
				$right = '<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>';
				$liClass = 'treeview menu-open';
			}
			if ($voMenu['current'] == 1 || $parentRule['parentid'] == $voMenu['id']) {
				$navMenu = '';
				$submenuShow = 'show';
			} else {
				$navMenu = 'collapsed';
				$submenuShow = '';
			}
		?>
		<li class="nav-item">
			<a class="nav-link {$navMenu}" href="#" data-toggle="collapse" data-target="#menu_{$voMenu['id']}" aria-expanded="false" aria-controls="menu_{$voMenu['id']}">
				<i class="iconfontzz icon-menu-shu"></i>
				<span>{$voMenu['name']}</span>
			</a>
			<div id="menu_{$voMenu['id']}" class="collapse collapse-parent {$submenuShow}">
				<ul class="collapse-inner">
					<h6 class="collapse-header" style="display: none;">Custom Components:</h6>
					{volist name="voMenu['childs']" id="voChild"}
					<?php
						if (!$voChild['checked']) {
							continue;
						}
						if (!$voChild['display']) {
							continue;
						}
						if ($voChild['current'] == 1 || $parentRule['id'] == $voChild['id']) {
							$subActive = 'active';
							$navMenu = '';
							$submenuShow = 'show';
						} else {
							$subActive = '';
							$navMenu = 'collapsed';
							$submenuShow = '';
						}
					?>
					<li>
						{if condition="$voChild['has_sub']"}
							<a class="collapse-item {$navMenu}" href="#" data-toggle="collapse" data-target="#menu_{$voChild['id']}" aria-expanded="false" aria-controls="menu_{$voChild['id']}">
								<i class="iconfontzz icon-menu-leaf"></i>
								<span>{$voChild['name']}</span>
							</a>
							<div id="menu_{$voChild['id']}" class="collapse collapse-sub {$submenuShow}">
								<ul class="collapse-inner">
									{volist name="voChild['subs']" id="voSub"}
									<?php
										if (!$voSub['checked']) {
											continue;
										}
										if (!$voSub['display']) {
											continue;
										}
										if ($voSub['current'] == 1 || $parentRule['id'] == $voSub['id']) {
											$subActive = 'active';
										} else {
											$subActive = '';
										}
									?>
									<li>
										<a class="collapse-item {$subActive}" href="{$voSub['url']}">
											<i class="iconfontzz icon-menu-leaf"></i>
											{$voSub['name']}
										</a>
									</li>
									{/volist}
								</ul>
							</div>
						{else /}
							<a class="collapse-item {$subActive}" href="{$voChild['url']}">
								<i class="iconfontzz icon-menu-leaf"></i>
								<span>{$voChild['name']}</span>
							</a>
						{/if}
					</li>
					{/volist}
				</ul>
			</div>
			<span class="daui-nav-bar"></span>
		</li>
		{/volist}
	{/volist}
	
	<!-- Divider -->
	<hr class="sidebar-divider d-none d-md-block">

</ul>
<!-- End of Sidebar -->